package ms.db.mongodb;

import lombok.Data;

public class QueryParam {
	public enum Sort {
		ASC(1), 
		DESC(-1);
		
		private int sort;

		Sort(int sort) {
			this.sort = sort;
		}
		
		public int value() {
			return sort;
		}
	}

	@Data
	public static class SortField {
		private String fieldName;
		private Sort sort;
		
		public SortField(String fieldName, Sort sort) {
			this.fieldName = fieldName;
			this.sort = sort;
		}
	}
}
